#define   _CRT_SECURE_NO_WARNINGS 1
int maxArea(int* height, int heightSize) {
    int l = 0;
    int r = heightSize - 1;
    int ret = 0;
    while (l < r)
    {
        int h = height[l] > height[r] ? height[r] : height[l];
        int area = h * (r - l);
        ret = ret > area ? ret : area;
        if (height[l] < height[r])
            l++;
        else
            r--;
    }
    return ret;
}